# ../addons/manilib/core/commands/__init__.py

'''
$Rev: 8 $
$Author: pitkley $
$Date: 2009-11-01 17:54:55 +0000 (Sun, 01 Nov 2009) $
'''

# ==============================================================================
# >> IMPORTS
# ==============================================================================
import es

# ==============================================================================
# >> CLASSES
# ==============================================================================
class Command(object): #Thanks to freddukes
    def __getattr__(self, command):
        return self.CommandWrapper(command)
    class CommandWrapper(object):
        def __init__(self, command):
            self.command = command
        def __call__(self, *args):
            es.server.queuecmd("ma_%s %s" % (self.command, \
                " ".join(map(str, args))))